package com.sg.zhui.visitor.adapter;

import android.graphics.Color;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.sg.zhui.visitor.R;
import com.sg.zhui.visitor.bean.HomeCaseListBean;
import com.sg.zhui.visitor.widget.RecyclerViewAdapter;
import com.sg.zhui.visitor.widget.ViewHolderHelper;



/**
 * Created by chenlipeng on 2018/7/11 0011
 * describe:  申请记录的适配器
 */

public class ApplicationRecordAdapter extends RecyclerViewAdapter<HomeCaseListBean> {
    public ApplicationRecordAdapter(RecyclerView recyclerView) {
        super(recyclerView, R.layout.application_record_item);
    }

    @Override
    protected void fillData(ViewHolderHelper viewHolderHelper, int position, HomeCaseListBean model) {

        TextView view = viewHolderHelper.getView(R.id.tv_statue);
        if ("1".equals(model.getStatus())) {
            view.setTextColor(Color.parseColor("#41dc20"));
            view.setText("使用中");
        } else {
            view.setTextColor(Color.parseColor("#6299df"));
            view.setText("待生效");

        }
//        //viewHolderHelper.setText(R.id.leixing_mingzi, model.getTitle());
//
//        String getBegin_time = com.guo.qlzx.maxiansheng.util.ToolUtil.getStrTime(model.getCreate_time(),"yyyy.MM.dd");
//
//        viewHolderHelper.setText(R.id.shijian, getBegin_time);
    }
}
